import { createStore } from 'vuex'

export default createStore({
    state: {
        isLogin: 0,
        commonList: [],
    },
    mutations: {
        SET_COMMON_LIST(state, val) {
            state.commonList = val;
        },
        SET_IS_LOGIN(state, val) {
            state.isLogin = val;
        },
    },
    actions: {
        getCommonlistAction({ commit }, data) {
            commit('SET_COMMMON_LIST', data);
        },
        changeIsLogin({ commit }, val) {
            commit('SET_IS_LOGIN', val);
        },
    }
})